package com.xiang.sql.entity;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 库存变动日志 数据实体
 * 
 * @author mac-xiang
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "`stock_log`", autoResultMap = true)
@ApiModel(value = "库存变动日志 对象", description = "库存变动日志")
public class StockLog implements Serializable {

  private static final long serialVersionUID = 1L;
  /** id */
  @TableId(value = "id", type = IdType.ASSIGN_ID)
  public String id;

  /** 关联单据id */
  @TableField(value = "`oid`", fill = FieldFill.INSERT)
  public String oid;

  /** 状态 1:已写入 */
  @TableField(value = "`state`", fill = FieldFill.INSERT)
  public Integer state;

  /** 红冲id */
  @TableField(value = "`redress`", fill = FieldFill.INSERT)
  public String redress;

  /** 创建时间 */
  @TableField(value = "`create_time`", fill = FieldFill.INSERT)
  public Long createTime;

  /** 创建用户 */
  @TableField(value = "`user`", fill = FieldFill.INSERT)
  public String user;

  /** 库存id */
  @TableField(value = "`stock`", fill = FieldFill.INSERT)
  public String stock;

  /** 数量 */
  @TableField(value = "`sum`", fill = FieldFill.INSERT)
  public Integer sum;

  /** 说明 */
  @TableField(value = "`des`", fill = FieldFill.INSERT)
  public String des;

  /** 商户id */
  @TableField(value = "gid", exist = false)
  public String gid;
  /** 商户名称 */
  @TableField(value = "group_name", exist = false)
  public String groupName;
  /** 商品id */
  @TableField(value = "goods", exist = false)
  public String goods;
  /** 商品名称 */
  @TableField(value = "goods_name", exist = false)
  public String goodsName;
  /** 商品单价 */
  @TableField(value = "goods_money", exist = false)
  public Integer goodsMoney;
  /** 地址id */
  @TableField(value = "addr", exist = false)
  public String addr;

  public StockLog() {
  }
}